package com.zygh.policeasset.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zygh.policeasset.mapper.DataLabelsMapper;
import com.zygh.policeasset.pojo.DataLabels;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/service/DataLabelsService.class */
public class DataLabelsService {
    @Autowired
    DataLabelsMapper dataLabelsMapper;

    public Integer add(DataLabels dataLabels) {
        return this.dataLabelsMapper.add(dataLabels);
    }

    public Integer delete(Integer id) {
        return this.dataLabelsMapper.deleteById(id);
    }

    public Integer update(String name, Integer toEnable, Integer id) {
        return this.dataLabelsMapper.updateById(name, toEnable, id);
    }

    public PageInfo<DataLabels> selectList(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(this.dataLabelsMapper.selectList());
    }

    public List<DataLabels> findAll() {
        return this.dataLabelsMapper.selectList();
    }

    public DataLabels selectById(Integer id) {
        return this.dataLabelsMapper.selectById(id);
    }

    public Integer updateToEnable() {
        return this.dataLabelsMapper.updateToEnable();
    }
}